package com.qsd.TeacherSystem.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.qsd.common.pojo.TeacherEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.qsd.common.po.Teacher;
import org.apache.ibatis.annotations.Select;
import sun.print.BackgroundLookupListener;

@Mapper
public interface TeacherDao extends BaseMapper<TeacherEntity> {

    @Select("select t.*,u.user_url from teacher t inner join userHeads u on t.username= u.user_name ${ew.customSqlSegment} order by  u.create_time desc limit 1 ")
    Teacher findTeacherInfomation(@Param(Constants.WRAPPER) Wrapper<TeacherEntity> wrapper);
}
